import json

import requests


def get_wanianli(year, month, day):
    url = f"http://101.35.2.25/api/time/getzdday.php?id=10007754&key=03105261003c7524ccf8607ad5425225&nian={year}&yue={month}&ri={day}"
    payload = {}
    headers = {
        'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',
        'Accept': '*/*',
        'Host': '101.35.2.25',
        'Connection': 'keep-alive'
    }
    response = requests.request("GET", url, headers=headers, data=payload)
    resp = json.loads(response.text)
    print(resp)
    return {
        "阴历年": resp.get("YIYEAR"),
        "阴历年中文": resp.get("nnian"),
        "阴历月": resp.get("YIMONTH"),
        "阴历月中文": resp.get("nyue"),
        "阴历日": resp.get("YIDAY"),
        "阴历日中文": resp.get("nri")
    }


if __name__ == '__main__':
    res = get_wanianli(2025, 9, 1)
    print(res)
